import ajax from "./baseReq";
export const baseUrl = 'http://112.124.67.43:8088/iot';

// 查询全部轮播图
export const ReqAllRotationChart = () => ajax(baseUrl + '/rotationchart/list')
// 获取视频信息
export const ReqVideoList = () => ajax(baseUrl + '/video/list')
// 获取全部专家
export const ReqAllExperts = (data) => ajax(baseUrl + '/expert/list',data)
// 姓名模糊搜索专家
export const ReqExpert =(data) => ajax(baseUrl+'/expert/info',data)
// 获取网站中心介绍
export const ReqCenterIntro = () => ajax(baseUrl + '/describeinfo/list')
// 获取全部企业logo
export const ReqLogo = () =>ajax(baseUrl + '/indexlogourl/list/all')
// 查询单个专家信息
export const ReqOneExpert = (data) => ajax(baseUrl + '/expert/info/' + data.id)
// 获取文章
export const ReqArticle = (data) => ajax(baseUrl + '/article/list/', data)
//获取NAS
export const ReqNas = (data) => ajax(baseUrl + '/naslink/list/', data)
//查询Nas文章
export const ReqSearchNas = (data) => ajax(baseUrl + '/naslink/info/', data)
//查找文章
export const ReqSearch = (data) => ajax(baseUrl + '/article/info/', data)
// 查询全部需求
export const ReqAllDemand = (data) => ajax(baseUrl + '/demand/list', data)
// 根据具体的id去查询需求
export const ReqDemandDetail = (id) => ajax(baseUrl + `/demand/info/${id}`)
// 根据企业用户的身份查询需求
export const ReqDemandByUserId = (data) =>ajax(baseUrl + `/demand/userDemand/`,data)
// 发布需求
export const ReqPostDemand = (data) => ajax(baseUrl + '/demand/save', data, 'POST');
// 修改需求
export const ReqEditDemand =(data) =>ajax(baseUrl + '/demand/update',data,'POST')
// 根据需求id获取一级评论
export const ReqDemandCommentParent = (data) => ajax(baseUrl + `/comment/getParent`, data)

// 根据一级评论的id获取二级评论
export const ReqSonFromParent = (data) => ajax(baseUrl + `/comment/getSon`, data)
// 发布评论
export const ReqPublishComment = (data) => ajax(baseUrl + '/comment/save', data, "POST")
// 获取所有需求分类
export const ReqCommentClass = () => ajax(baseUrl + '/demand/getFen');
// 查询企业用户
export const ReqEnterPriseUser = () => ajax(baseUrl + '/enterpriseuser/list')
// 查询合作伙伴用户
export const ReqCooperativeUser = () => ajax(baseUrl + '/cooperativeuser/list')
// 查询个人顾问
export const ReqPersonalUser = (data) => ajax(baseUrl + '/personaluser/list', data)
// 查询全部项目
export const ReqAllProject = () => ajax(baseUrl + '/project/list')
// 查询我的项目
export const ReqMyProject =(id) =>ajax(baseUrl +'/project/listByCreateId',id,'POST')
// 根据条件查询项目
export const ReqlistByStatusAndDate =(data) =>ajax(baseUrl+'/project/listByStatusAndDateAndId',data)
// 获取全部需求分类
export const ReqAllDemandClassify = () => ajax(baseUrl + '/demand/getFen')
// 查询合作伙伴用户中的个人顾问
export const ReqAllCooperPersonUser = (data) => ajax(baseUrl + '/cooperativeuser/listWithPersonal', data)
// 禁用用户状态
export const ReqProhibitUser = (data) => ajax(baseUrl + '/user/prohibit', data)
// 删除用户
export const ReqDeleteUser = (data) => ajax(baseUrl + '/user/delete', data, "POST")
// 根据项目id去查询人员信息 
export const ReqProjectMan = (id) => ajax(baseUrl + '/projectuserrelation/listProjectPro', id);
// 添加项目评分
export const ReqProjectScore = (data) => ajax(baseUrl + '/score/saveScorePro', data, 'POST')
// 查询项目评分
export const ReqCheckScore = (data) => ajax(baseUrl + '/score/listScorePro', data)
// 查询合作伙伴下面的全部个人顾问
export const ReqCooperPersonUser = () => ajax(baseUrl + '/cooperativeuser/listAllWithPersonalUser')
// 根据用户id,返回用户信息
export const ReqUserInfoByUserId = (data) => ajax(baseUrl + '/user/info/' + data.id)
// 根据需求id获取需求详细信息
export const ReqDemandDetailInfoById = (data) => ajax(baseUrl + '/demand/info/' + data.id)
// 根据项目id获取项目中参与人
export const ReqPersonByProjectId = (data) => ajax(baseUrl + '/projectuserrelation/listProjectPro', data)
// 新建项目
export const ReqAddProject = (data) => ajax(baseUrl + '/project/add', data, "POST")
// 查询出项目评分
export const ReqListScorePro = (data) => ajax(baseUrl + '/score/listScorePro', data)
// 更新项目评分
export const ReqUpdateProjectScore = (data) => ajax(baseUrl + '/score/updateScorePro', data, "POST")
// 创建企业评分
export const ReqEnterpriseScored = (data) => ajax(baseUrl + '/score/enterpriseScored', data, "POST")
// 创建个人顾问评分
export const ReqPersonalScored = (data) => ajax(baseUrl + '/score/personalScored', data, "POST")
// 修改项目评分
export const ReqUpdateScorePro = (data) => ajax(baseUrl + '/score/updateScorePro', data, "POST")
// 获取评论
export const ReqCommentParent = (data) => ajax(baseUrl + "/comment/getParent", data)
// 根据一级评论id，获取评论的回复
export const ReqCommentCallBackById = (data) => ajax(baseUrl + '/comment/getNext', data)
// 根据id查询
export const ReqCommentById = (data) => ajax(baseUrl + '/comment/info/' + data.id)
// 添加评论
export const ReqAddComment = (data) => ajax(baseUrl + '/comment/add', data, "POST")
// 根据状态和日期查询需求
export const ReqDemandByStatus = (data) => ajax(baseUrl + '/demand/info', data)
// 企业用户信息填报
export const ReqEnterpriseuserUpdate = (data) => ajax(baseUrl + '/enterpriseuser/update', data, 'POST')
// 个人用户信息填报
export const ReqPersonaluserUpdate = (data) => ajax(baseUrl + '/personaluser/update', data, 'POST')
// 合作伙伴信息填报
export const ReqCooperativeuserUpdate = (data) => ajax(baseUrl + '/cooperativeuser/update', data, 'POST')
// 根据id去查询用户具体信息
export const ReqInforoId = (id) => ajax(baseUrl + `/user/info/${id}`)
// 登录
export const ReqLogin = (data) => ajax(baseUrl + '/user/login/', data, "POST")
//注册
export const ReqRegister = (data) => ajax(baseUrl + '/user/register/', data, "POST")
// 查询某个合作伙伴用户下的个人顾问
export const ReqPersonal = (id) => ajax(baseUrl + '/cooperativeuser/listWithPersonal/', id)
//删除个人顾问
export const ReqDelete = (id) => ajax(baseUrl + '/user/delete/', id, "POST")
//禁用
export const ReqProhibit = (data) => ajax(baseUrl + '/user/prohibit/', data)
//添加个人用户到某个合作伙伴
export const ReqAddPersonal = (data) => ajax(baseUrl + '/cooperativeuser/addPersonalRelation/', data, "POST")
//查询个人顾客用户的项目
export const ReqProject = (id) => ajax(baseUrl + '/project/listByPersonalId/', id)
//获取网站中心介绍,7个页面
export const ReqCenterInfo = (data) => ajax(baseUrl + '/describeinfo/info', data)
//删除项目
export const ReqDeletePro = (id) => ajax(baseUrl + '/project/delete/', id, "POST")
// 企业用户给个人顾问评分
export const ReqPartnerScored = (data) => ajax(baseUrl + '/score/testScored', data, "POST")
// 个人顾问自评
export const ReqAdviserScored = (data) => ajax(baseUrl + '/score/selfJudge', data, "POST")
// 获取所有管理员用户
export const ReqadminList =(data) =>ajax(baseUrl+'/user/admin/list', data)
// 根据姓名搜索管理员
export const ReqSearchAdmin =(data) =>ajax(baseUrl+'/user/query',data)
//检查用户名是否可用
export const ReqUserexit = (data) => ajax(baseUrl + '/user/exist', data)
// 修改项目状态
export const ReqchangeProjectStatus =(data) =>ajax(baseUrl+'/project/updateStatus',data,'POST')
// 修改项目状态
export const ReqManchangeStatus =(data) =>ajax(baseUrl+'/demand/updateStatus',data,'POST')


